package com.kcht.np.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.kcht.np.entity.SysPermission;
import com.kcht.np.vo.permission.PermCanCreateInfo;
import com.kcht.np.vo.permission.PermCanModifyInfo;

import java.util.Set;

/**
  * <p>
  * 权限 Service 接口
  * </p>
  *
  * @Package:        com.kcht.np.mp.service
  * @Description:    权限 Service 接口
  * @Author:         liuqi
  * @CreateDate:     2020/3/31 21:32
 */

public interface SysPermissionService extends IService<SysPermission> {

    /**
     * 查询用户可执行的所有权限
     */
    Set<SysPermission> findPermissionByUserId(Long uid);

    /**
     * 查询角色被赋予的所有权限
     */
    Set<SysPermission> findPermissionByRoleId(Long rid);


    void savePermission(PermCanCreateInfo info);

    void updatePermission(PermCanModifyInfo info);
}
